home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group00b.txt / 000088_icon-group-sender_Mon Oct 23 08:18:31 2000.msg < prev    next >
Internet Message Format  |  2001-01-03  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9NFIKH18444
  4.     for icon-group-addresses; Mon, 23 Oct 2000 08:18:20 -0700 (MST)
  5. Message-Id: <200010231518.e9NFIKH18444@baskerville.CS.Arizona.EDU>
  6. From: Atle <trollet@skynet.be>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: How to "declare" a string?
  9. Date: Mon, 23 Oct 2000 14:39:37 +0200
  10. X-Trace: news0.skynet.be 972303850 19771 194.78.236.176 (23 Oct 2000 12:24:10 GMT)
  11. X-Complaints-To: abuse@skynet.be
  12. X-Accept-Language: en
  13. To: icon-group@cs.arizona.edu
  14. Errors-To: icon-group-errors@cs.arizona.edu
  15. Status: RO
  16. Content-Length: 742
  17.  
  18. symbiot@my-deja.com wrote:
  19.  
  20. > best I can tell, it is choking because UPPER has not been "declared".
  21. I am a *total* newbie, but I may have an answer to this one
  22. (Icon programmer please correct this if wrong)
  23. Icon will extract as much information from your statements as possible.
  24.  
  25. so, if you initialize a variable like this:
  26.  
  27. i := 0
  28.  
  29. it will not need an
  30.  
  31. i : INTEGER to figure it out, it knows that 0 is an integer, and will declare i implicitely.
  32.  
  33. the same with a string:
  34.  
  35. s := ""
  36.  
  37. will implicitely declare s to be string type.
  38.  
  39. If in the start of your program, you set
  40.  
  41. UPPER := ""
  42.  
  43. you might solve an 'undeclared' reference ...
  44.  
  45. PS!
  46. Please have this checked. It is just a suggestion.
  47. ENDPS!
  48.  
  49. -- 
  50. Best wishes, Atle
  51.  
  52. users.skynet.be/atle
  53.